import request from '@/utils/request'

// 查询股票周线列表
export function listWeekly(query) {
  return request({
    url: '/stock/weekly/list',
    method: 'get',
    params: query
  })
}

// 查询股票月线列表(不分页)
export function listAllWeekly(query) {
  return request({
    url: '/stock/weekly/all',
    method: 'get',
    params: query
  })
}

// 查询股票周线详细
export function getWeekly(id) {
  return request({
    url: '/stock/weekly/' + id,
    method: 'get'
  })
}

// 新增股票周线
export function addWeekly(data) {
  return request({
    url: '/stock/weekly',
    method: 'post',
    data: data
  })
}

// 修改股票周线
export function updateWeekly(data) {
  return request({
    url: '/stock/weekly',
    method: 'put',
    data: data
  })
}

// 删除股票周线
export function delWeekly(id) {
  return request({
    url: '/stock/weekly/' + id,
    method: 'delete'
  })
}
